package com.alliance.shuwei.entity;

import java.util.List;

import javax.persistence.CollectionTable;
import javax.persistence.Column;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;

@Entity
@Table(name = "company")
@JsonInclude(Include.NON_NULL)
public class Company extends Auditable {
	@Id
	@GeneratedValue
	@Column(name = "company_id")
	private Integer id;
	private String fullName;
	private String logo;
	private String logoPicture;
	@JsonProperty("copy_right")
	private String copyRight;
	@ElementCollection
	@CollectionTable(name = "company_contact_infos", joinColumns = @JoinColumn(name = "company_id"))
	private List<ContactInfo> contactInfos;
	@ElementCollection
	@CollectionTable(name = "company_friend_links", joinColumns = @JoinColumn(name = "company_id"))
	private List<FriendLink> friendLinks;
	private String site;

	public Integer getId() {
		return id;
	}

	@JsonProperty("id")
	public void setId(Integer id) {
		this.id = id;
	}

	public String getFullName() {
		return fullName;
	}

	@JsonProperty("full_name")
	public void setFullName(String fullName) {
		this.fullName = fullName;
	}

	public String getLogo() {
		return logo;
	}

	public void setLogo(String logo) {
		this.logo = logo;
	}

	public String getLogoPicture() {
		return logoPicture;
	}

	@JsonProperty("logo_picture")
	public void setLogoPicture(String logoPicture) {
		this.logoPicture = logoPicture;
	}

	public String getCopyRight() {
		return copyRight;
	}

	public void setCopyRight(String copyRight) {
		this.copyRight = copyRight;
	}

	@JsonProperty("contact_infos")
	public List<ContactInfo> getContactInfos() {
		return contactInfos;
	}

	@JsonProperty("contact_infos")
	public void setContactInfos(List<ContactInfo> contactInfos) {
		this.contactInfos = contactInfos;
	}

	@JsonProperty("friend_links")
	public List<FriendLink> getFriendLinks() {
		return friendLinks;
	}

	@JsonProperty("friend_links")
	public void setFriendLinks(List<FriendLink> friendLinks) {
		this.friendLinks = friendLinks;
	}

	public String getSite() {
		return site;
	}

	public void setSite(String site) {
		this.site = site;
	}

}
